package linwen.wang.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author zero
 */
@Data
@AllArgsConstructor
@NoArgsConstructor

public class BaseEntity extends Model<BaseEntity> {

    @TableId(type = IdType.ASSIGN_ID)
    Long id;

    @TableField(value = "deleted",fill = FieldFill.INSERT)
    @TableLogic(delval = "Y",value = "N")
    private String deleted;

    @TableField(value = "version",fill = FieldFill.INSERT)
    @Version
    private String version;

    @TableField("created_by")
    String createdBy;

    @TableField(value = "created_time",fill = FieldFill.INSERT)
    Date createdTime;

    @TableField("updated_by")
    String updatedBy;

    @TableField(value = "updated_time",fill = FieldFill.INSERT_UPDATE)
    Date updatedTime;

}